package com.aspose.cells;

public class Picture extends Shape {
   short a = 1;
   SignatureLine b;

   Picture(ShapeCollection shapes) {
      super(shapes, 8, shapes);
   }

   void a(Picture var1, CopyOptions var2) {
      boolean var3 = var1.L() == this.L();
      if (var1.u != null) {
         this.u = zyd.a(var1.L(), this.L(), var1.u, 0, 0, 0);
      }

      if (var1.v != null) {
         this.v = zyd.a(var1.L(), this.L(), var1.v, 0, 0, 0);
      }

      if (var1.g != null) {
         this.g = new zpq();
         if (var2.a) {
            this.g.a = var1.g.a;
            this.g.b = var1.g.b;
            this.g.d = var1.g.d;
         }
      }

      this.f(var1.ac());
      this.N().a(var1.N(), var2);
      if (var1.O() != null) {
         this.O().a(var1.O());
      }

      if (!var3 && !var2.a) {
         this.O().a = null;
      }

      if (var1.x != null && !var1.x.a()) {
         if (var2.a) {
            this.x = var1.x;
            this.x.k = this;
         } else if (this.L() == var1.L()) {
            zpf var4 = var1.x;
            zpf var5 = new zpf(this, var4.e);
            var5.a(var4, var2);
            this.x = var5;
            var5.b = zase.y(this.N().i().b());
         }
      }

      if (var1.a() != null) {
         zcb var6 = var1.a();
         if (var6 != null) {
            this.a(this.J().d().b().a(var6, var1.b(), var3));
         } else {
            this.a((int)0);
         }
      }

   }

   public void move(int upperLeftRow, int upperLeftColumn) {
      this.a(upperLeftRow, 0, upperLeftColumn, 0);
   }

   zcb a() {
      return this.b() < 1 ? null : this.J().d().b().a(this.b() - 1);
   }

   public int getOriginalHeight() {
      zcb var1 = this.a();
      return var1 == null ? 0 : this.a().l();
   }

   public int getOriginalWidth() {
      zcb var1 = this.a();
      return var1 == null ? 0 : this.a().k();
   }

   int b() {
      return this.N().c().c(16644, 0);
   }

   void a(int var1) {
      this.N().c().a(16644, 0, var1);
   }

   public Color getBorderLineColor() {
      return this.getLineFormat().getForeColor();
   }

   public void setBorderLineColor(Color value) {
      this.getLineFormat().setForeColor(value);
   }

   public double getBorderWeight() {
      return this.getLineFormat().getWeight();
   }

   public void setBorderWeight(double value) {
      this.getLineFormat().setWeight(value);
   }

   public byte[] getData() {
      zcb var1 = this.a();
      return var1 == null ? null : var1.b();
   }

   public void setData(byte[] value) throws Exception {
      if (this.b() != -1) {
         int var2 = this.b();
         this.a((int)0);
         this.J().f(var2);
      }

      if (value != null) {
         this.a(this.J().d().b().a(value) + 1);
      }
   }

   public String getSourceFullName() {
      return (this.c() & 10) != 0 ? this.N().c().e(49413) : null;
   }

   public void setSourceFullName(String value) {
      this.N().c().a(49413, 2, value);
      this.b(14);
      if (this.N().c().c(16644) != null) {
         zcb var2 = this.a();
         if (var2 != null) {
            var2.j();
         }

         this.N().c().b(16644);
      }

   }

   void a(String var1) {
      this.N().c().a(49413, 2, var1);
      this.b(14);
   }

   public String getFormula() {
      return this.ac();
   }

   public void setFormula(String value) {
      this.f(value);
   }

   int c() {
      return this.N().c().c(262, 0);
   }

   void b(int var1) {
      this.N().c().a(262, 0, var1);
   }

   boolean d() {
      return (this.c() & 8) != 0;
   }

   void a(short var1) {
      this.a = var1;
   }

   public boolean isAutoSize() {
      return (this.a & 1) != 0;
   }

   public void setAutoSize(boolean value) {
      if (value) {
         this.a = (short)(this.a | 1);
      } else {
         this.a = (short)(this.a & -2);
      }

   }

   public boolean isLink() {
      return (this.a & 2) == 2;
   }

   public void setLink(boolean value) {
      if (value) {
         this.a = (short)(this.a | 2);
      } else {
         this.a = (short)(this.a & -3);
      }

   }

   public boolean isDynamicDataExchange() {
      return (this.a & 4) != 0;
   }

   public void setDynamicDataExchange(boolean value) {
      if (value) {
         this.a = (short)(this.a | 4);
      } else {
         this.a = (short)(this.a & -5);
      }

   }

   public boolean getDisplayAsIcon() {
      return (this.a & 8) != 0;
   }

   public void setDisplayAsIcon(boolean value) {
      if (value) {
         this.a = (short)(this.a | 8);
      } else {
         this.a = (short)(this.a & -9);
      }

   }

   boolean e() {
      return (this.a & 16) != 0;
   }

   boolean f() {
      return (this.a & 32) == 0;
   }

   public ImageFormat getImageFormat() throws Exception {
      zcb var1 = this.a();
      return var1 != null && var1.f() != null && var1.f().e() != null ? var1.a() : ImageFormat.getBmp();
   }

   public double getOriginalHeightCM() {
      return this.h(this.getOriginalHeight());
   }

   public double getOriginalWidthCM() {
      return this.h(this.getOriginalWidth());
   }

   public double getOriginalHeightInch() {
      return this.b((double)this.getOriginalHeight());
   }

   public double getOriginalWidthInch() {
      return this.b((double)this.getOriginalWidth());
   }

   public SignatureLine getSignatureLine() {
      return this.b;
   }

   public void setSignatureLine(SignatureLine value) {
      this.b = value;
   }
}
